.PHONY: selection insertion merge quick heap bubble shell bulk help

all: selection insertion merge quick heap bubble shell bulk
	@echo "执行所有排序算法"

selection: selection.c array_help.c array_generator.c 
	gcc -o selection selection.c array_help.c array_generator.c && \
		./selection && \
		rm -f ./selection

insertion: insertion.c array_help.c array_generator.c 
	gcc -o insertion insertion.c array_help.c array_generator.c && \
		./insertion && \
		rm -f ./insertion

merge: merge.c array_help.c array_generator.c 
	gcc -o merge merge.c array_help.c array_generator.c && \
		./merge && \
		rm -f ./merge

quick: quick.c array_help.c array_generator.c 
	gcc -o quick quick.c array_help.c array_generator.c && \
		./quick && \
		rm -f ./quick

heap: heap.c array_help.c array_generator.c 
	gcc -o heap heap.c array_help.c array_generator.c && \
		./heap && \
		rm -f ./heap

bubble: bubble.c array_help.c array_generator.c 
	gcc -o bubble bubble.c array_help.c array_generator.c && \
		./bubble && \
		rm -f ./bubble

shell: shell.c array_help.c array_generator.c 
	gcc -o shell shell.c array_help.c array_generator.c && \
		./shell && \
		rm -f ./shell

bulk: bulk.c array_help.c array_generator.c 
	gcc -o bulk bulk.c array_help.c array_generator.c && \
		./bulk && \
		rm -f ./bulk

help: 
	@echo " > selection 选择排序" 
	@echo " > insertion 插入排序" 
	@echo " > merge     归并排序" 
	@echo " > quick     快速排序" 
	@echo " > heap      堆排序"   
	@echo " > bubble    冒泡排序" 
	@echo " > shell     希尔排序" 
	@echo " > bulk      桶排序" 